<!DOCTYPE html>
<html>
<head lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0 user-scalable=no"/>
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta name="description" content="">
<meta name="keywords" content="">
<title>海风商城</title>
<link rel="stylesheet" href="/css/base.css"/>
<link rel="stylesheet" href="/css/index.css"/>
<link rel="shortcut icon" href="favicon.ico" />
{insert_scripts files="../../js/jquery-1.12.3.min.js"}
{insert_scripts files="../../js/swiper.min.js"}
{insert_scripts files="../../js/jquery.json.js"}
<script>
      var iScale = 1;
        !function(){
            var htmlEl = document.getElementsByTagName('html')[0];
            var fitPage = function(){
                /* The calculate of with from zepto  */
                var w = htmlEl.getBoundingClientRect().width;
                w = Math.round(w);
                w = w > 640 ? 640: w;
                var newW = w/640 * 100;
                htmlEl.style.fontSize = newW + 'px';
            }
            fitPage();
            var t;
            var func = function(){
                clearTimeout(t);
                t = setTimeout(fitPage, 25);
            }
            window.addEventListener('resize', func);
        }();
</script>
</head>
<body>

<!--banner Start-->
<div class="wrapper">
  <div class="page-product-view">
  <!--header Start-->
  <div class="header ">
    <div class="left fl">
      <a onclick="history.go(-1)" class="home">
      <img src="/images/hf/icon_back_n.png" class="ib">
      <i></i>
      </a>
    </div>
    <div class="tit">
      <h2><span class="title">{$goods_info.goods_name}</span></h2>
    </div>
    <div class="right fr">
    </div>
  </div>
  <!--header End  -->
    <div class="b1 clearfix">
      <img src="/{$goods_info.goods_img}">
    </div>
    <div class="b2">
      <p class="pro-title ">{$goods_info.goods_name}</p>
      <div class="clearfix detail-price">
        <p>
          <!-- {if $only_price} -->
          <span class="class-price-unit">￥</span><span class="class-price">{$min_price}</span>
          <!-- {else} -->
          <span class="class-price-unit">￥</span><span class="class-price">{$min_price}</span>
          <!-- {/if} -->
          <!-- {if $max_price} -->
          <span class="class-price">~</span><span class="class-price">{$max_price}</span>
          <!-- {/if} -->
          <!--促销活动简短说明-->
        </p>
      </div>
    </div>
    <div class="clearfix detail-panel">
      <!-- {foreach from=$specification item=spec key=spec_key} -->
      <dl>
          <dt><em data="{$spec_key}">{$spec_key}</em>：</dt>
          <!-- {foreach from=$spec item=value key=key} -->
          <dd class="{$value.curr}">
              <!-- {if $value.link}-->
              <a href="/mobile/goods.php{$value.link}">{$value.cat_name}</a><b></b>
              <!-- {else} -->
              <a class="cur_price" data-price="{$value.cat_price}" goods-id="{$value.goods_id}" attr-id="{$value.goods_attr_id}">{$value.cat_name}</a><b></b>
              <!-- {/if} --> 
          </dd>
          <!-- {/foreach} -->
      </dl>
      <!-- {/foreach} -->
    </div>
    <!-- 课程特色 -->
    <div class="item-tese clearfix">
      <ul class="item-info-list clearfix">
        <li class="list-item"><a href="javascript:;">系统化学习</a></li>
        <li class="list-item"><a href="javascript:;">24H内答疑</a></li>
        <li class="list-item"><a href="javascript:;">作业批改</a></li>
        <li class="list-item"><a href="javascript:;">资料下载</a></li>
        <li class="list-item"><a href="javascript:;">互动直播课</a></li>
        <li class="list-item"><a href="javascript:;">名师答疑</a></li>
      </ul>
    </div>
    <!-- 图片详情开始 -->
    <div class="good-detail clearfix">
     <!--  <p>
        <img src="/images/hf/detail_02.jpg" alt="" title="">
      </p>
      <p>
        <img src="/images/hf/detail_03.jpg" alt="" title="">
      </p>
      <p>
        <img src="/images/hf/detail_04.jpg" alt="" title="">
      </p>
       <p>
        <img src="/images/hf/detail_05.jpg" alt="" title="">
      </p>
       <p>
        <img src="/images/hf/detail_06.jpg" alt="" title="">
      </p>
       <p>
        <img src="/images/hf/detail_07.jpg" alt="" title="">
      </p>
       <p>
        <img src="/images/hf/detail_08.jpg" alt="" title="">
      </p>
       <p>
        <img src="/images/hf/detail_09.jpg" alt="" title="">
      </p>
       <p>
        <img src="/images/hf/detail_10.jpg" alt="" title="">
      </p>
       <p>
        <img src="/images/hf/detail_11.jpg" alt="" title="">
      </p> -->
     
     
    <iframe src="/getMHfjy.php" width="100%" marginheight="0" marginwidth="0" frameborder="0" scrolling="no" height="100%" id="iframepage" name="iframepage" onLoad="iFrameHeight()" >
    </iframe>
</div>
<script type="text/javascript" language="javascript">

    function iFrameHeight() {

        var ifm= document.getElementById("iframepage");


        var subWeb = document.frames ? document.frames["iframepage"].document :

ifm.contentDocument;

            if(ifm != null && subWeb != null) {

            ifm.height = subWeb.body.scrollHeight;
            }

    }

</script> 
    <!-- 图片详情结束 -->
    <div class="product-footer">
      <div class="btns-box clearfix">
        <a  class="btns btnGreen btnBuy "><i class="iconfont">&#xe608;</i>立即购买</a>
        <a href="http://www10.53kf.com/webCompany.php?arg=10069074&style=1&keyword=&kf=" class="btns btnConsult"><i class="iconfont">&#xe607;</i>课程咨询</a>
      </div>
    </div>
   <div style="display: none;">
        <form method="post" action="/mobile/order.php?act=order_lise" id="post_form">
            <input type="hidden" class="item_info" name="item_info" value="">
            <input type="submit" />
        </form>
    </div>
  </div>
</div>
{include file="/public.html"}
<script type="text/javascript">
    var is_login = "{$is_login}";
    var item_info = new Object();
    var fangan = "{$fangan}";
    var nianji = "{$nianji}";
    var keshi  = "{$keshi}";
    var is_vip = "{$is_vip}";
    var only_price = "{$only_price}";

    var goods_id = "{$goods_id}";
    var attr_id = "{$attr_id}";
    var has_max_price = "{$has_max_price}";
    var json_item_info = '';
    var _is_select = true;



    $(function(){
        $('.btnBuy').click(function(e){ buyItem();})
    })

    function buyItem(){
        
        noSelect();
        if( !_is_select ){
          return;
        }

        if( has_max_price != "0" ){
          alert('没有可以购买的课程，请您重新选择');
          return;
        
        
        item_info['nianji'] = nianji;
        item_info['fangan'] = fangan;
        item_info['is_vip']= is_vip;
        item_info['only_price']= only_price;
        item_info['goods_id']= goods_id;
        item_info['attr_id']= attr_id;
        json_item_info = $.toJSON( item_info );

        if( _is_select && has_max_price == "0" ){
          if( is_login == "0" ) $('.login').show();
          else{
              $('.item_info').val(json_item_info);
              $('#post_form').submit();
          }
        }
        return false;
    }

    function noSelect(){
        $('.detail-panel > dl').each(function(i,e){
            var type = $(this).find('dt > em').text();
            var cur_select = $(this).find('dd.curr > a').text();
            if( !cur_select && type != 'VIP' ){
              _is_select = false;
              alert("请选择" + type);
              return false;
            }
        });
        return true;
    }

</script>
<script type="text/javascript">
  Zepto(function($){

        function preventDefault(e) {
            e = e || window.event;
            e.preventDefault && e.preventDefault();
            e.returnValue = false;
        }

        function stopPropagation(e){
      e = e || window.event;
      e.stopPropagation && e.stopPropagation();
      e.cancelBubble = false;
        }

        function innerScroll(e){
          // 阻止冒泡到document
          // document上已经preventDefault
          stopPropagation(e);

      var delta = e.wheelDelta || e.detail || 0;
      var box = $(this).get(0);

      if($(box).height() + box.scrollTop >= box.scrollHeight){
        if(delta < 0) {
          preventDefault(e);
          return false;
        }
      }
      if(box.scrollTop === 0){
        if(delta > 0) {
          preventDefault(e);
          return false;
        }
      }
      // 会阻止原生滚动
      // return false;
        }

    var disableScroll = function(){
      $(document).on('mousewheel', preventDefault);
      $(document).on('touchmove', preventDefault);
    };

    var enableScroll = function(){
      $(document).off('mousewheel', preventDefault);
      $(document).off('touchmove', preventDefault);
    };
    // bind
    $(".lg").on("click",function(e){
      $('.login').show();
       // enableScroll();
             
    });
    
    
    // 内部可滚
    $('.login, .register, .resetpwd, .class-dialog, .course-ad ').on('mousewheel', innerScroll);
    // 外部禁用
    // disableScroll();


    // 移动端touch重写
    var startX, startY;
    $('.login, .register, .resetpwd, .class-dialog, .course-ad ').on('touchstart', function(e){
      startX = e.changedTouches[0].pageX;
      startY = e.changedTouches[0].pageY;
    });

    // 仿innerScroll方法
    $('.login, .register, .resetpwd, .class-dialog, .course-ad ').on('touchmove', function(e){
      e.stopPropagation();

      var deltaX = e.changedTouches[0].pageX - startX;
      var deltaY = e.changedTouches[0].pageY - startY;

      // 只能纵向滚
      if(Math.abs(deltaY) < Math.abs(deltaX)){
        e.preventDefault();
        return false;
      }

      var box = $(this).get(0);

      if($(box).height() + box.scrollTop >= box.scrollHeight){
        if(deltaY < 0) {
          e.preventDefault();
          return false;
        }
      }
      if(box.scrollTop === 0){
        if(deltaY > 0) {
          e.preventDefault();
          return false;
        }
      }
      // 会阻止原生滚动
      // return false;
    });

  });
  </script>
  

</body>
</html>